package com.cy.pj.modules.controller;

import com.cy.pj.common.vo.JsonResult;
import com.cy.pj.common.web.domain.BaseController;
import com.cy.pj.modules.service.ISkuShopService;
import com.cy.pj.modules.vo.SkuShopVo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 商品货品Controller
 *
 * @author kiven
 * @date 2023-02-09
 */
@Controller
@RequestMapping("/skuShop")
public class SkuShopController extends BaseController
{
    private String prefix = "modules/skuShop";

    @Autowired
    private ISkuShopService skuShopService;

    @RequiresPermissions("skuShop:view")
    @GetMapping()
    public String sku()
    {
        return prefix + "/skuShop";
    }

    /**
     * 查询商品货品列表
     */
    @RequiresPermissions("skuShop:list")
    @GetMapping("/list")
    @ResponseBody
    public JsonResult list(SkuShopVo skuShopVo, Integer pageCurrent)
    {
        return new JsonResult(skuShopService.selectSkuShopList(skuShopVo,pageCurrent));
    }

}
